import type { Metadata } from 'next'; import Link from 'next/link'; import { notFound } from 'next/navigation'; import { DiffViewer } from '@/components/events/diff-viewer'; import { Container, Note } from '@/components/ui/section'; import { api, ApiError } from '@/lib/api'; import { fmtDateTime, fmtInt } from '@/lib/format'; import { routes } from '@/lib/site'; export const revalidate = 3600; export const metadata: Metadata = { title: 'Snapshot diff', robots: { index: false } }; export default async function SnapshotDiffPage({ params }: { params: Promise<{ id: string; other: string }> }) { const { id, other } = await params; let d; try { d = await api.snapshotDiff(id, other); } catch (e) { if (e instanceof ApiError && e.notFound) notFound(); throw e; } return (

Historical page viewer · semantic diff

v{d.before.version_no} → v{d.after.version_no}

{[d.before, d.after].map((s, i) => (

{i === 0 ? 'Before' : 'After'}

{s.title ?? '—'}

{fmtDateTime(s.fetched_at)} · {fmtInt(s.block_count)} blocks · {fmtInt(s.text_length)} chars

Open version →
))}

Sensor

Computed on demand from the two stored snapshots. Block identities are stable across versions so moved content is not reported as removed + added.
); }